package my_center

import (
	"github.com/astaxie/beego/orm"
	"time"
)

// SalarySlip 根据工资条创建模型
type SalarySlip struct {
	Id                   int       `orm:"pk;auto"`
	CardId               string    `orm:"column(card_id);size(64);description(员工工号)"`
	BasePay              float64   `orm:"description(基本工资);digits(12);decimals(2)"` // digit长度，decimal小数点
	WorkingDay           float64   `orm:"description(工作天数);digits(3);decimals(1)"`
	DayOff               float64   `orm:"description(请假天数);digits(3);decimals(1)"`
	DayOffNo             float64   `orm:"description(调休天数);digits(3);decimals(1)"`
	Reward               float64   `orm:"description(奖金);digits(8);decimals(2)"`
	RentSubsidy          float64   `orm:"description(租房补贴);digits(6);decimals(2)"`
	TransSubsidy         float64   `orm:"description(交通补贴);digits(6);decimals(2)"`
	SocialSecurity       float64   `orm:"description(社保);digits(6);decimals(2)"`
	HousingProvidentFund float64   `orm:"description(住房公积金);digits(6);decimals(2)"`
	PersonalIncomeTax    float64   `orm:"description(个人所得税);digits(6);decimals(2)"`
	Fine                 float64   `orm:"description(罚金);digits(6);decimals(2)"`
	NetSalary            float64   `orm:"description(实发工资);digits(12);decimals(2)"`
	PayDate              string    `orm:"description(工资月份);column(pay_date);size(32)"`
	CreateTime           time.Time `orm:"description(创建时间);type(datetime);auto_now"`
}

func (s SalarySlip) TableName() string {
	return "sys_salary_slip"
}

func init() {
	orm.RegisterModel(new(SalarySlip))
}
